/*
* $Id: CommonControl.h 2 2009-12-23 13:58:02Z volok-aleksej@yandex.ru $
*
* Copyright 2008-2009 by Volokitin Alexey
* All rights reserved
*
*/
#ifndef _COMMON_CONTROL_H_
#define _COMMON_CONTROL_H_

class CCommonControl
{
public:
	CCommonControl();
	~CCommonControl();
	
	virtual void OnKeyDown(int nChar, CWnd* m_pParen);
};

class CCommonButton : public CButton, public CCommonControl
{
protected:
	DECLARE_MESSAGE_MAP()
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
public:
	CCommonButton();
	virtual ~CCommonButton();
};

class CCommonEdit : public CEdit, public CCommonControl
{
protected:
	DECLARE_MESSAGE_MAP()
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
public:
	CCommonEdit();
	virtual ~CCommonEdit();
};

class CCommonCombobox : public CComboBox, public CCommonControl
{
protected:
	DECLARE_MESSAGE_MAP()
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
public:
	CCommonCombobox();
	virtual ~CCommonCombobox();
};

class CCommonListBox : public CListBox, public CCommonControl
{
protected:
	DECLARE_MESSAGE_MAP()
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
public:
	CCommonListBox();
	virtual ~CCommonListBox();
};

class CCommonDateTimeCtrl : public CDateTimeCtrl, public CCommonControl
{
	DECLARE_MESSAGE_MAP()
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
public:
	CCommonDateTimeCtrl();
	virtual ~CCommonDateTimeCtrl();
};

#endif /*_COMMON_CONTROL_H_*/